$OpenBSD: patch-provider_libserver_StreamUtil_cpp,v 1.6 2015/04/05 22:25:08 robert Exp $
--- provider/libserver/StreamUtil.cpp.orig	Thu Mar  5 16:54:01 2015
+++ provider/libserver/StreamUtil.cpp	Fri Apr  3 23:11:10 2015
@@ -283,7 +283,9 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 	unsigned int ulKind;
 	unsigned int ulNameId;
 	std::string strNameString;
+#ifndef __OpenBSD__
 	locale_t loc = createlocale(LC_NUMERIC, "C");
+#endif
 	convert_context converter;
 
 	short i;
@@ -330,7 +332,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 			er = ZARAFA_E_NOT_FOUND;
 			goto exit;
 		}
+#ifndef __OpenBSD__
 		flt = (float)strtod_l(lpRow[FIELD_NR_DOUBLE], NULL, loc);
+#else
+		flt = (float)strtod(lpRow[FIELD_NR_DOUBLE], NULL);
+#endif
 		er = lpSink->Write(&flt, sizeof(flt), 1);
 		break;
 	case PT_BOOLEAN:
@@ -347,7 +353,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 			er = ZARAFA_E_NOT_FOUND;
 			goto exit;
 		}
+#ifndef __OpenBSD__
 		dbl = strtod_l(lpRow[FIELD_NR_DOUBLE], NULL, loc);
+#else
+		dbl = strtod(lpRow[FIELD_NR_DOUBLE], NULL);
+#endif
 		er = lpSink->Write(&dbl, sizeof(dbl), 1);
 		break;
 	case PT_CURRENCY:
@@ -444,7 +454,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 		for (unsigned x = 0; er == erSuccess && x < ulCount; x++)
 		{
 			ParseMVProp(lpRow[FIELD_NR_DOUBLE], lpLen[FIELD_NR_DOUBLE], &ulLastPos, &strData);
+#ifndef __OpenBSD__
 			flt = (float)strtod_l(strData.c_str(), NULL, loc);
+#else
+			flt = (float)strtod(strData.c_str(), NULL);
+#endif
 			er = lpSink->Write(&flt, sizeof(flt), 1);
 		}
 		break;
@@ -461,7 +475,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 		for (unsigned x = 0; er == erSuccess && x < ulCount; x++)
 		{
 			ParseMVProp(lpRow[FIELD_NR_DOUBLE], lpLen[FIELD_NR_DOUBLE], &ulLastPos, &strData);
+#ifndef __OpenBSD__
 			dbl = strtod_l(strData.c_str(), NULL, loc);
+#else
+			dbl = strtod(strData.c_str(), NULL);
+#endif
 			er = lpSink->Write(&dbl, sizeof(dbl), 1);
 		}
 		break;
@@ -579,7 +597,9 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 	}
 
 exit:
+#ifndef __OpenBSD__
 	freelocale(loc);
+#endif
 	return er;
 }
 
